package cn.bdqn.handler;

import cn.bdqn.exception.JxcException;
import cn.bdqn.utils.ResultVoUtil;
import cn.bdqn.vo.ResultVo;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 郑大仙丶
 * @date 2018-12-28 16:55
 */
@ControllerAdvice
public class JxcExceptionHandler {



    @ExceptionHandler(JxcException.class)
    @ResponseBody
    public ResultVo handler(JxcException ex){
        return ResultVoUtil.error(ex);
    }


}
